Conversation
cardoe
left a comment
There was a problem hiding this comment.
Add an entry into charts/argocd-understack/templates and it'll get deployed automatically put cdn in values.yaml under the site: block.
| spec: | ||
| accessModes: | ||
| - ReadWriteOnce | ||
| storageClassName: openebs-hostpath |
There was a problem hiding this comment.
Probably not where we'd want this since that would mean we have to ping the nginx to a specific node?
There was a problem hiding this comment.
It's for the cache. The intention was to get fast, cheap, simple storage. If the pod moves to another node then it would re-populate the cache over there. If we run multiple pods, I don't know how that would interact with ceph-backed distributed storage.
There was a problem hiding this comment.
Storage on openebs-hostpath is quite limited - imho it normally should not be used for applications. The openebs-lvm would be better choice if you want to keep it local. If ceph, then ceph-block-ecoded if you want block or ceph-fs-ec if you want ReadWriteMany
There was a problem hiding this comment.
I moved it to openebs-lvm, multiple writers on ceph seems too advanced.
641b729 to
66e204a
Compare
skrobul
left a comment
There was a problem hiding this comment.
Consider packaging those manifests into a helm chart so that the values can be adjusted on per-environment basis easily.
If you don't want to use the helm's default template, we have https://github.com/rxt-pvc/backbone-sno-helm-scaffold/ that is slightly smaller but will need adjustments for HTTPRoutes
| maxObjects: "1000" | ||
| maxSize: "5G" |
There was a problem hiding this comment.
that seems quite small, imho should be configurable
There was a problem hiding this comment.
Increased the size and made it configurable (via values.yaml)
|
Before merging, can we change the namespace to something like "understack-cdn" to avoid possible future overlaps? |
I changed the namespace name. I will remember this every time I have to type that name :) |
f6dd6a4 to
ec40cb2
Compare
e240966 to
068a2d9
Compare
e37fec6 to
922c9a6
Compare
| apiVersion: v1 | ||
| kind: Namespace | ||
| metadata: | ||
| name: understack-cdn |
There was a problem hiding this comment.
We shouldn't need this manifest. Helm can make its own and ArgoCD will track that for full clean up.
We can also eventually make the namespaces configurable to allow testing in parallel.
| kind: ConfigMap | ||
| metadata: | ||
| name: nginx-config | ||
| namespace: understack-cdn |
There was a problem hiding this comment.
Don't need to set this as helm will when it's installing.
| proxy_hide_header x-amz-request-id; | ||
| proxy_hide_header x-amz-id-2; | ||
|
|
||
| include /etc/nginx/conf.d/*.conf; |
There was a problem hiding this comment.
So this mostly looks like the default file. Should we just mount the delta in a file here?
| kind: ObjectBucketClaim | ||
| metadata: | ||
| name: {{ .Values.cdn.bucketName }} | ||
| namespace: understack-cdn |
| namespace: understack-cdn | ||
| spec: | ||
| bucketName: {{ .Values.cdn.bucketName }} | ||
| storageClassName: ceph-bucket |
There was a problem hiding this comment.
Should this be configurable as well? Can it change?
| kind: PersistentVolumeClaim | ||
| metadata: | ||
| name: nginx-cache | ||
| namespace: understack-cdn |
| spec: | ||
| accessModes: | ||
| - ReadWriteOnce | ||
| storageClassName: openebs-lvm |
| storageClassName: openebs-lvm | ||
| resources: | ||
| requests: | ||
| storage: 5Gi |
| kind: Service | ||
| metadata: | ||
| name: cdn-edge | ||
| namespace: understack-cdn |
We also use a global back-end object store via a public hostname and using SSL to secure the connection (the backend can now be in a different cluster to the cache).
|
We can address the rest in a follow on. |
This provides a HTTPS endpoint that will serve up files from our back-end object storage.
These manifests will create a global storage bucket to hold the content.
A site-local nginx proxy caches the files locally (should work for deployments in countries far away or on slow links).
The ingress was set up for cdn-edge cache on dev: https://github.com/RSS-Engineering/undercloud-deploy/pull/1332